package com.anli1.controller;


import com.anli1.entity.pojo.Coupon;
import com.anli1.entity.pojo.CouponRedemption;
import com.anli1.entity.vo.R;
import com.anli1.service.ICouponRedemptionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-10-05
 */
@RestController
@RequestMapping("/coupon-redemption")
public class CouponRedemptionController {
    @Autowired
    ICouponRedemptionService iCouponRedemptionService;
    @PostMapping("/snatching")
    @ApiOperation(value="抢卷")
    public R qiangjuan(@RequestBody CouponRedemption coupon)
    {
        R r=iCouponRedemptionService.qiangjuan(coupon);
        return r;
    }
}
